<?php if (!defined('THINK_PATH')) exit();?><script type="text/javascript">
    $(function () {
        $(".datepicker").datepicker({
            language: "zh-CN",
            autoclose: true,//选中之后自动隐藏日期选择框
            clearBtn: true,//清除按钮
            todayBtn: true,//今日按钮
            format: "yyyy-mm-dd"//日期格式，详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
        });
    });
</script> 
<style type="text/css">
	.form-group{
		padding: 5px 0;
	}
	.table th, .table td { 
		text-align: center; 
		height:20px;
	}	
</style>			
<div class="modal-header">
	<button class="close" data-dismiss="modal"><span>&times;</span></button>
	<h4 class="modal-title">图纸登记</h4>
</div>
<form  action="<?php echo U('Depart/Dwg/add_dwg');?>" method="post">
	<div class="modal-body">
		<div class="container-fluid">
			<div class="form-group">
				<label for="dwgcode" class="col-sm-2 control-label">图号</label>
				<div class="col-sm-3">
					<input type="text" name="dwgcode" class="form-control">
				</div>
				<label for="spec" class="col-sm-2 control-label">型号规格</label>
				<div class="col-sm-4">
					<input type="text" name="spec" class="form-control">
				</div>
			</div>
			<div class="form-group">
				<label for="dwgname" class="col-sm-2 control-label">图纸名称</label>
				<div class="col-sm-10">
					<input type="text" name="dwgname" class="form-control">
				</div>
			</div>

		  	<div class="form-group">
				<label for="volume" class="col-sm-2 control-label">容积</label>
				<div class="col-sm-2">
					<input type="text" name="volume" class="form-control">
				</div>
				<label for="medium" class="col-sm-2 control-label">介质</label>
				<div class="col-sm-2">
					<input type="text" name="medium" class="form-control">
				</div>
				<label for="wpressure" class="col-sm-2 control-label">工作压力</label>
				<div class="col-sm-2">
					<input type="text" name="wpressure" class="form-control">
				</div>
			</div>

		
		
			<div class="form-group">					
				<label for="date" class="col-sm-2 control-label">设计日期</label>	
				<div class="col-sm-4">				
					<input type="text" class="datepicker form-control" placeholder="请选择日期" name="date"/>
				</div>
				<label for="date" class="col-sm-2 control-label">设计人</label>
				<div class="col-sm-4">
					<select class="form-control" name="designer">
					    <?php if(is_array($map['users'])): foreach($map['users'] as $key=>$v): ?><option value=<?php echo ($v['id']); ?>><?php echo ($v['realname']); ?></option><?php endforeach; endif; ?>
				    </select>
			</div>	
			<div class="form-group">
				<div class="btn-group col-sm-5" data-toggle="buttons">
					<label for="" class="btn btn-primary">
						<input type="radio" name="mode" class="form-control" value="立式"><span>立式</span>
					</label>
					<label for="" class="btn btn-primary active" >
						<input type="radio" name="mode" class="form-control" value="卧式" checked><span>卧式</span>
					</label>
					
				</div>
				<div class="col-sm-3">
					<select class="form-control" name="type">
					    <?php if(is_array($map['type'])): foreach($map['type'] as $key=>$v): ?><option value=<?php echo ($v['id']); ?>><?php echo ($v['title']); ?></option><?php endforeach; endif; ?>
				    </select>
			  	</div>
			  	
				<div class="btn-group col-sm-4" data-toggle="buttons">
					<label for="" class="btn btn-primary">
						<input type="radio" name="category" class="form-control" value="1"><span>I</span>
					</label>
					<label for="" class="btn btn-primary active" >
						<input type="radio" name="category" class="form-control" value="2" checked><span>II</span>
					</label>
					<label for="" class="btn btn-primary">
						<input type="radio" name="category" class="form-control" value="3"><span>III</span> 
					</label>
				</div>
			<div class="clean"></div>				
		</div>
	</div>
	</div>
	<div class="modal-footer">
		<input type="submit" class="btn btn-default" value="登记">
	</div>
</form>